#include <func.h>
#define WAIT_TIME 5
#define CLIENT_NUM 100

typedef struct queue_element_t
{
    int fd[CLIENT_NUM];
    int num;
    bool isempty;
}queue_element;

int init_element(queue_element *ele);
int flag=1;
 typedef struct Queue
{
    queue_element element[WAIT_TIME+1];
    int front;
    int rear;
    int time_site;
    int fd_hash[CLIENT_NUM];
}CircularQueue;

void initQueue(CircularQueue *queue);
int isEmpty(CircularQueue *queue);
int isFull(CircularQueue *queue);
int enqueue(CircularQueue *queue, queue_element ele);
int dequeue(CircularQueue *queue, queue_element *ele);
int init_queue_hash(CircularQueue *queue);
int addelement_fd(CircularQueue *queue,int fd);
int change_ele(CircularQueue *queue,int fd,int fd_hash[]);
int timeout_exit(int fd,time_t *pass_time,int *time_flag,CircularQueue * queue);
int del_ele(CircularQueue *queue,int fd);
int clear_ele(CircularQueue *queue);



